/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/views/layout/Layout'

const nestedRouter = {
    path: '/nested',
    component: Layout,
    redirect: '/nested/menu1/menu1-1',
    name: 'Nested',
    meta: {
        title: 'nested',
        icon: 'nested',
        guid: '4b7154ae-1e4a-11ef-a12f-00163e0acd8d',
        roles: ['admin']
    },
    children: [{
            path: 'menu1',
            component: () =>
                import ('@/views/nested/menu1/index'), // Parent router-view
            name: 'Menu1',
            meta: {
                title: 'menu1',
                guid: '72154545-1e4a-11ef-a12f-00163e0acd8d',
                roles: ['admin']
            },
            redirect: '/nested/menu1/menu1-1',
            children: [{
                    path: 'menu1-1',
                    component: () =>
                        import ('@/views/nested/menu1/menu1-1'),
                    name: 'Menu1-1',
                    meta: {
                        title: 'menu1-1',
                        guid: 'a81ab2e4-1e4a-11ef-a12f-00163e0acd8d',
                        roles: ['admin']
                    }
                },
                {
                    path: 'menu1-2',
                    component: () =>
                        import ('@/views/nested/menu1/menu1-2'),
                    name: 'Menu1-2',
                    redirect: '/nested/menu1/menu1-2/menu1-2-1',
                    meta: {
                        title: 'menu1-2',
                        guid: 'aba703e8-1e4a-11ef-a12f-00163e0acd8d',
                        roles: ['admin']
                    },
                    children: [{
                            path: 'menu1-2-1',
                            component: () =>
                                import ('@/views/nested/menu1/menu1-2/menu1-2-1'),
                            name: 'Menu1-2-1',
                            meta: {
                                title: 'menu1-2-1',
                                guid: 'e765d2cf-1e4a-11ef-a12f-00163e0acd8d',
                                roles: ['admin']
                            }
                        },
                        {
                            path: 'menu1-2-2',
                            component: () =>
                                import ('@/views/nested/menu1/menu1-2/menu1-2-2'),
                            name: 'Menu1-2-2',
                            meta: {
                                title: 'menu1-2-2',
                                guid: 'eb2751a9-1e4a-11ef-a12f-00163e0acd8d',
                                roles: ['admin']
                            }
                        }
                    ]
                },
                {
                    path: 'menu1-3',
                    component: () =>
                        import ('@/views/nested/menu1/menu1-3'),
                    name: 'Menu1-3',
                    meta: {
                        title: 'menu1-3',
                        guid: 'c897766e-1e4a-11ef-a12f-00163e0acd8d',
                        roles: ['admin']
                    }
                }
            ]
        },
        {
            path: 'menu2',
            name: 'Menu2',
            component: () =>
                import ('@/views/nested/menu2/index'),
            meta: {
                title: 'menu2',
                guid: '772f3ae1-1e4a-11ef-a12f-00163e0acd8d',
                roles: ['admin']
            }
        }
    ]
}

export default nestedRouter